Skip to content

GH-21006 approach 3: JIT-compile FETCH_OBJ_FUNC_ARG (staging)#133

Open
iliaal wants to merge 1 commit into
masterfrom
fix/gh-21006-jit-approach3
Open

GH-21006 approach 3: JIT-compile FETCH_OBJ_FUNC_ARG (staging)#133
iliaal wants to merge 1 commit into
masterfrom
fix/gh-21006-jit-approach3

Conversation

@iliaal

@iliaal iliaal commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Approach 3 for phpGH-21006 (compile FETCH_OBJ_FUNC_ARG inline instead of skipping the trace). Staging only, to run the full CI matrix including FREEBSD_NTS and Alpine musl-ASAN. Validated locally on glibc (GLOBAL_REGS) and musl clang-ASAN (!GLOBAL_REGS): gh21006 plus by-ref positional and named cases pass, ext/opcache/tests/jit and Zend/tests/property_hooks clean, and the hot loop is now JIT-traced.

FETCH_OBJ_FUNC_ARG reading a SIMPLE_GET property hook pushed the getter
call frame mid-trace and corrupted the call being built, crashing at the
following SEND_FUNC_ARG. Compile it inline like FETCH_OBJ_R, clearing the
SIMPLE_GET flag so the read takes read_property. Positional arguments
resolve their by-ref-ness at compile time through the preceding
CHECK_FUNC_ARG; named arguments get a run-time guard that deoptimizes to
the interpreter when the argument is passed by reference.

Fixes phpGH-21006
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant